#open(BUFF,"gunzip -c markers.txt.gz |") or die "no file exists\n";
open(BUFF,"markers_new.txt");
while(<BUFF>)
{
	chomp($_);
	@array = split(" ",$_);
	#print "$array[0] $array[1]\n";
	$hash{$array[0]} = $array[1];
}
open(BUFF,"newhapmap3_sample_run.tped") or die "no input file\n";
$n = 0;
while(<BUFF>)
{
	chomp($_);
	 #@array = split(" ",$_);
	#print "$array[0] $array[1]\n";
	if($_ =~ m/^23/ )
	{
		@array = split(" ",$_);
		#print "$array[1]\n";
		if(exists($hash{$array[1]}))
		{
			#print "$array[1]\t$hash{$array[1]}\t$array[3]\n";
			if($hash{$array[1]} ne $array[3])
			{
				#die " $array[1]\n";
				$n++;
			}
			else
			{
			#	print "sucess\n";
			}
		}
	}
}
print "$n\n";
